package 考试;

import java.util.*;

public class _第二题 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        List<Integer> list = new ArrayList<>();
        Integer[] arr = null;
        list.add(1);
        int target = sc.nextInt();
        int index = Arrays.binarySearch(arr, target);
        if (index < 0) {
            // 如果没有，就把target加入到数组，再二分查找
            list.add(target);
            arr = list.toArray(new Integer[]{});
            Arrays.sort(arr);
            index = Arrays.binarySearch(arr, target);
            System.out.println(index);
        } else {
            System.out.println(index);
        }

    }

}

